---
title: React Badge - Flowbite
description: Get started with the badge component to add labels or counters inside paragraphs, buttons, and inputs based on multiple colors and sizes from React and Tailwind CSS
---

The badge component can be used to show text, labels, and counters inside a small box or circle element which can be placed inside paragraphs, buttons, dropdowns, menu items, and more.

You can choose from multiple examples of badges based on the color, size, and icon and even use it as a link component by leveraging the properties from React and classes from Tailwind CSS.

To start using the badge component you need to import it from `flowbite-react`:

```jsx
import { Badge } from "flowbite-react";
```

## Default badges

Here's a list of default `<Badge>` component examples where you can use the `color` property to change the color of the badge based on contextual colors such as info, gray, success, and more.

<Example name="badge.root" />

## Badge as link

Use the badge as a link component by wrapping it with an anchor element.

<Example name="badge.asLink" />

## Badge with icon

Add an icon to the badge by using the `icon` property and pass the icon component as a value. This can be used to show the status of a task or a notification often used for admin dashboards and user feeds.

<Example name="badge.withIcon" />

## Badge with icon only

An alternative style for the badge component is by only showing an icon without any text. You can do this by removing the children from the component and only using the `icon` property.

<Example name="badge.withIconOnly" />

## Sizes

Update the size of the badge component by using the `size` property and passing the size as a value.

You can choose from `xs` and `sm` sizes.

<Example name="badge.sizes" />

## Theme

To learn more about how to customize the appearance of components, please see the [Theme docs](/docs/customize/theme).

<Theme name="badge" />

## References

- [Flowbite Badge](https://flowbite.com/docs/components/badge/)
